package com.googlecode.transmutant.spring;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;

import org.codehaus.groovy.util.StringUtil;
import org.junit.Before 
import org.junit.Test;
import org.junit.runner.RunWith 
import org.springframework.beans.factory.annotation.Autowired 
import org.springframework.context.ApplicationContext 
import org.springframework.test.context.ContextConfiguration 
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner 

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("captureStep.xml")
public class TransmutantNamespaceHandlerCaptureStepTest {

	@Autowired
	ApplicationContext applicationContext
	
	@Test
	public void testCreateSteps() throws Exception {
		SpringStepper stepper = applicationContext.getBean("stepper")
		stepper.run()
		assert "Hello World*".equals(stepper.captures.getCapturedValue("helloWorld2"))
	}
}
